<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文本对象</title>
</head>
<body>
    <form action="#" id="myform">
        <input type="text" id="myinput" name="user" value="wmf healthy">
    </form>
    <script type="text/javascript">
         // 获取myinput元素
        var myinput = document.getElementById("myinput");
        //获取文本框的值
        console.log(myinput.value);
        //修改文本框的值
        myinput.value = "wmf is healthy";
        console.log(myinput.value);
        //设置文本框为禁用状态(一般不写成disabled)
        myinput.disabled = true;
        console.log(myinput.disabled);

         /**
          *         总结：
          像disabled这种二选一的状态值，用js设置属性的时候一般用boolean
          checked:单选和复选
          selected：下拉框的选中
          readOnly:

          在标签中设置标签属性的时候：
          disabled = "disabled"
          <input type = "text" disabled="disabed"/>
          <input type = "text" disabled/>
          */




    </script>
</body>
</html>